package com.example.demo.design.creational.factorymethod;

/**
 * 工厂方法
 *
 * @author luowj12
 * @since 2021/5/6 16:23
 */
public class AbstractFactoryTest {

    public static void main(String[] args) {
        try {
            Product a;
            AbstractFactory af;
            af = (AbstractFactory) new ConcreteFactory1();
            a = af.newProduct();
            a.show();
        } catch (Exception e) {
            System.out.println(e.getMessage());
        }
    }
}
